# Makefile for ps2pkm --te@dbs.uni-hannover.de. Public domain.
version = 1.5m

kpse_include ../make/paths.mk
kpse_include ../make/common.mk
kpse_include ../make/programs.mk
prog_cflags = -DUNIX -DKPATHSEA

libobj = arith.o curves.o fontfcn.o hints.o lines.o objects.o paths.o \
         regions.o scanfont.o spaces.o t1funcs.o t1info.o t1io.o \
         t1snap.o t1stub.o token.o type1.o util.o bstring.o basics.o
common_objects = pkout.o filenames.o
ps2pkobjs = $(libobj) ps2pk.o encoding.o pkout.o filenames.o
pk2bmobjs = pk2bm.o pkin.o
pfb2pfaobjs = pfb2pfa.o filenames.o basics.o
magobjs = mag.o basics.o

program = ps2pk
programs = pfb2pfa mag pk2bm $(program)

default all: $(programs)

$(program): $(kpathsea) $(ps2pkobjs)
	$(kpathsea_link)  $(ps2pkobjs) $(LOADLIBES)
pk2bm: $(kpathsea) $(pk2bmobjs)
	$(kpathsea_link) $(pk2bmobjs) $(LOADLIBES)
pfb2pfa: $(kpathsea) $(pfb2pfaobjs)
	$(kpathsea_link) $(pfb2pfaobjs) $(LOADLIBES)
mag: $(kpathsea) $(magobjs)
	$(kpathsea_link) $(magobjs) $(LOADLIBES)

kpse_include ../make/tkpathsea.mk

install: install-exec install-data
uninstall: uninstall-exec uninstall-data

install-exec: $(programs)
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
	for p in $(programs); do $(INSTALL_LIBTOOL_PROG) $$p $(bindir); done
uninstall-exec:
	for p in $(programs); do rm -f $(bindir)/$$p; done

install-data: mag.1 pfb2pfa.1 pk2bm.1 ps2pk.1
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(man1dir)
	$(INSTALL_DATA) $(srcdir)/mag.1 $(man1dir)/mag.$(manext)
	$(INSTALL_DATA) $(srcdir)/pfb2pfa.1 $(man1dir)/pfb2pfa.$(manext)
	$(INSTALL_DATA) $(srcdir)/pk2bm.1 $(man1dir)/pk2bm.$(manext)
	$(INSTALL_DATA) $(srcdir)/ps2pk.1 $(man1dir)/ps2pk.$(manext)
uninstall-data:
	rm -f $(man1dir)/ps2pk.$(manext) $(man1dir)/pk2bm.$(manext) \
          $(man1dir)/pfb2pfa.$(manext) $(man1dir)/mag.$(manext)

pre-dist-$(distname):
post-dist-$(distname):

kpse_include ../make/dist.mk
kpse_include ../make/config.mk

info dvi check:

kpse_include ../make/clean.mk
kpse_include ../make/rdepend.mk
kpse_include depend.mk
